package org.openwork.portlet.skillmanagement.service;

import com.liferay.portal.kernel.util.BooleanWrapper;
import com.liferay.portal.kernel.util.ClassLoaderProxy;
import com.liferay.portal.kernel.util.IntegerWrapper;
import com.liferay.portal.kernel.util.LongWrapper;
import com.liferay.portal.kernel.util.NullWrapper;


public class SkillCategoryLocalServiceClp implements SkillCategoryLocalService {
    private ClassLoaderProxy _classLoaderProxy;

    public SkillCategoryLocalServiceClp(ClassLoaderProxy classLoaderProxy) {
        _classLoaderProxy = classLoaderProxy;
    }

    public org.openwork.portlet.skillmanagement.model.SkillCategory addSkillCategory(
        org.openwork.portlet.skillmanagement.model.SkillCategory skillCategory)
        throws com.liferay.portal.kernel.exception.SystemException {
        Object paramObj0 = ClpSerializer.translateInput(skillCategory);

        if (skillCategory == null) {
            paramObj0 = new NullWrapper(
                    "org.openwork.portlet.skillmanagement.model.SkillCategory");
        }

        Object returnObj = null;

        try {
            returnObj = _classLoaderProxy.invoke("addSkillCategory",
                    new Object[] { paramObj0 });
        } catch (Throwable t) {
            if (t instanceof com.liferay.portal.kernel.exception.SystemException) {
                throw (com.liferay.portal.kernel.exception.SystemException) t;
            }

            if (t instanceof RuntimeException) {
                throw (RuntimeException) t;
            } else {
                throw new RuntimeException(t.getClass().getName() +
                    " is not a valid exception");
            }
        }

        return (org.openwork.portlet.skillmanagement.model.SkillCategory) ClpSerializer.translateOutput(returnObj);
    }

    public org.openwork.portlet.skillmanagement.model.SkillCategory createSkillCategory(
        long id) {
        Object paramObj0 = new LongWrapper(id);

        Object returnObj = null;

        try {
            returnObj = _classLoaderProxy.invoke("createSkillCategory",
                    new Object[] { paramObj0 });
        } catch (Throwable t) {
            if (t instanceof RuntimeException) {
                throw (RuntimeException) t;
            } else {
                throw new RuntimeException(t.getClass().getName() +
                    " is not a valid exception");
            }
        }

        return (org.openwork.portlet.skillmanagement.model.SkillCategory) ClpSerializer.translateOutput(returnObj);
    }

    public void deleteSkillCategory(long id)
        throws com.liferay.portal.kernel.exception.PortalException,
            com.liferay.portal.kernel.exception.SystemException {
        Object paramObj0 = new LongWrapper(id);

        try {
            _classLoaderProxy.invoke("deleteSkillCategory",
                new Object[] { paramObj0 });
        } catch (Throwable t) {
            if (t instanceof com.liferay.portal.kernel.exception.PortalException) {
                throw (com.liferay.portal.kernel.exception.PortalException) t;
            }

            if (t instanceof com.liferay.portal.kernel.exception.SystemException) {
                throw (com.liferay.portal.kernel.exception.SystemException) t;
            }

            if (t instanceof RuntimeException) {
                throw (RuntimeException) t;
            } else {
                throw new RuntimeException(t.getClass().getName() +
                    " is not a valid exception");
            }
        }
    }

    public void deleteSkillCategory(
        org.openwork.portlet.skillmanagement.model.SkillCategory skillCategory)
        throws com.liferay.portal.kernel.exception.SystemException {
        Object paramObj0 = ClpSerializer.translateInput(skillCategory);

        if (skillCategory == null) {
            paramObj0 = new NullWrapper(
                    "org.openwork.portlet.skillmanagement.model.SkillCategory");
        }

        try {
            _classLoaderProxy.invoke("deleteSkillCategory",
                new Object[] { paramObj0 });
        } catch (Throwable t) {
            if (t instanceof com.liferay.portal.kernel.exception.SystemException) {
                throw (com.liferay.portal.kernel.exception.SystemException) t;
            }

            if (t instanceof RuntimeException) {
                throw (RuntimeException) t;
            } else {
                throw new RuntimeException(t.getClass().getName() +
                    " is not a valid exception");
            }
        }
    }

    @SuppressWarnings("unchecked")
    public java.util.List dynamicQuery(
        com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
        throws com.liferay.portal.kernel.exception.SystemException {
        Object paramObj0 = ClpSerializer.translateInput(dynamicQuery);

        if (dynamicQuery == null) {
            paramObj0 = new NullWrapper(
                    "com.liferay.portal.kernel.dao.orm.DynamicQuery");
        }

        Object returnObj = null;

        try {
            returnObj = _classLoaderProxy.invoke("dynamicQuery",
                    new Object[] { paramObj0 });
        } catch (Throwable t) {
            if (t instanceof com.liferay.portal.kernel.exception.SystemException) {
                throw (com.liferay.portal.kernel.exception.SystemException) t;
            }

            if (t instanceof RuntimeException) {
                throw (RuntimeException) t;
            } else {
                throw new RuntimeException(t.getClass().getName() +
                    " is not a valid exception");
            }
        }

        return (java.util.List) ClpSerializer.translateOutput(returnObj);
    }

    @SuppressWarnings("unchecked")
    public java.util.List dynamicQuery(
        com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
        int end) throws com.liferay.portal.kernel.exception.SystemException {
        Object paramObj0 = ClpSerializer.translateInput(dynamicQuery);

        if (dynamicQuery == null) {
            paramObj0 = new NullWrapper(
                    "com.liferay.portal.kernel.dao.orm.DynamicQuery");
        }

        Object paramObj1 = new IntegerWrapper(start);

        Object paramObj2 = new IntegerWrapper(end);

        Object returnObj = null;

        try {
            returnObj = _classLoaderProxy.invoke("dynamicQuery",
                    new Object[] { paramObj0, paramObj1, paramObj2 });
        } catch (Throwable t) {
            if (t instanceof com.liferay.portal.kernel.exception.SystemException) {
                throw (com.liferay.portal.kernel.exception.SystemException) t;
            }

            if (t instanceof RuntimeException) {
                throw (RuntimeException) t;
            } else {
                throw new RuntimeException(t.getClass().getName() +
                    " is not a valid exception");
            }
        }

        return (java.util.List) ClpSerializer.translateOutput(returnObj);
    }

    @SuppressWarnings("unchecked")
    public java.util.List dynamicQuery(
        com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
        int end,
        com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
        throws com.liferay.portal.kernel.exception.SystemException {
        Object paramObj0 = ClpSerializer.translateInput(dynamicQuery);

        if (dynamicQuery == null) {
            paramObj0 = new NullWrapper(
                    "com.liferay.portal.kernel.dao.orm.DynamicQuery");
        }

        Object paramObj1 = new IntegerWrapper(start);

        Object paramObj2 = new IntegerWrapper(end);

        Object paramObj3 = ClpSerializer.translateInput(orderByComparator);

        if (orderByComparator == null) {
            paramObj3 = new NullWrapper(
                    "com.liferay.portal.kernel.util.OrderByComparator");
        }

        Object returnObj = null;

        try {
            returnObj = _classLoaderProxy.invoke("dynamicQuery",
                    new Object[] { paramObj0, paramObj1, paramObj2, paramObj3 });
        } catch (Throwable t) {
            if (t instanceof com.liferay.portal.kernel.exception.SystemException) {
                throw (com.liferay.portal.kernel.exception.SystemException) t;
            }

            if (t instanceof RuntimeException) {
                throw (RuntimeException) t;
            } else {
                throw new RuntimeException(t.getClass().getName() +
                    " is not a valid exception");
            }
        }

        return (java.util.List) ClpSerializer.translateOutput(returnObj);
    }

    public long dynamicQueryCount(
        com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
        throws com.liferay.portal.kernel.exception.SystemException {
        Object paramObj0 = ClpSerializer.translateInput(dynamicQuery);

        if (dynamicQuery == null) {
            paramObj0 = new NullWrapper(
                    "com.liferay.portal.kernel.dao.orm.DynamicQuery");
        }

        Object returnObj = null;

        try {
            returnObj = _classLoaderProxy.invoke("dynamicQueryCount",
                    new Object[] { paramObj0 });
        } catch (Throwable t) {
            if (t instanceof com.liferay.portal.kernel.exception.SystemException) {
                throw (com.liferay.portal.kernel.exception.SystemException) t;
            }

            if (t instanceof RuntimeException) {
                throw (RuntimeException) t;
            } else {
                throw new RuntimeException(t.getClass().getName() +
                    " is not a valid exception");
            }
        }

        return ((Long) returnObj).longValue();
    }

    public org.openwork.portlet.skillmanagement.model.SkillCategory getSkillCategory(
        long id)
        throws com.liferay.portal.kernel.exception.PortalException,
            com.liferay.portal.kernel.exception.SystemException {
        Object paramObj0 = new LongWrapper(id);

        Object returnObj = null;

        try {
            returnObj = _classLoaderProxy.invoke("getSkillCategory",
                    new Object[] { paramObj0 });
        } catch (Throwable t) {
            if (t instanceof com.liferay.portal.kernel.exception.PortalException) {
                throw (com.liferay.portal.kernel.exception.PortalException) t;
            }

            if (t instanceof com.liferay.portal.kernel.exception.SystemException) {
                throw (com.liferay.portal.kernel.exception.SystemException) t;
            }

            if (t instanceof RuntimeException) {
                throw (RuntimeException) t;
            } else {
                throw new RuntimeException(t.getClass().getName() +
                    " is not a valid exception");
            }
        }

        return (org.openwork.portlet.skillmanagement.model.SkillCategory) ClpSerializer.translateOutput(returnObj);
    }

    public java.util.List<org.openwork.portlet.skillmanagement.model.SkillCategory> getSkillCategories(
        int start, int end)
        throws com.liferay.portal.kernel.exception.SystemException {
        Object paramObj0 = new IntegerWrapper(start);

        Object paramObj1 = new IntegerWrapper(end);

        Object returnObj = null;

        try {
            returnObj = _classLoaderProxy.invoke("getSkillCategories",
                    new Object[] { paramObj0, paramObj1 });
        } catch (Throwable t) {
            if (t instanceof com.liferay.portal.kernel.exception.SystemException) {
                throw (com.liferay.portal.kernel.exception.SystemException) t;
            }

            if (t instanceof RuntimeException) {
                throw (RuntimeException) t;
            } else {
                throw new RuntimeException(t.getClass().getName() +
                    " is not a valid exception");
            }
        }

        return (java.util.List<org.openwork.portlet.skillmanagement.model.SkillCategory>) ClpSerializer.translateOutput(returnObj);
    }

    public int getSkillCategoriesCount()
        throws com.liferay.portal.kernel.exception.SystemException {
        Object returnObj = null;

        try {
            returnObj = _classLoaderProxy.invoke("getSkillCategoriesCount",
                    new Object[0]);
        } catch (Throwable t) {
            if (t instanceof com.liferay.portal.kernel.exception.SystemException) {
                throw (com.liferay.portal.kernel.exception.SystemException) t;
            }

            if (t instanceof RuntimeException) {
                throw (RuntimeException) t;
            } else {
                throw new RuntimeException(t.getClass().getName() +
                    " is not a valid exception");
            }
        }

        return ((Integer) returnObj).intValue();
    }

    public org.openwork.portlet.skillmanagement.model.SkillCategory updateSkillCategory(
        org.openwork.portlet.skillmanagement.model.SkillCategory skillCategory)
        throws com.liferay.portal.kernel.exception.SystemException {
        Object paramObj0 = ClpSerializer.translateInput(skillCategory);

        if (skillCategory == null) {
            paramObj0 = new NullWrapper(
                    "org.openwork.portlet.skillmanagement.model.SkillCategory");
        }

        Object returnObj = null;

        try {
            returnObj = _classLoaderProxy.invoke("updateSkillCategory",
                    new Object[] { paramObj0 });
        } catch (Throwable t) {
            if (t instanceof com.liferay.portal.kernel.exception.SystemException) {
                throw (com.liferay.portal.kernel.exception.SystemException) t;
            }

            if (t instanceof RuntimeException) {
                throw (RuntimeException) t;
            } else {
                throw new RuntimeException(t.getClass().getName() +
                    " is not a valid exception");
            }
        }

        return (org.openwork.portlet.skillmanagement.model.SkillCategory) ClpSerializer.translateOutput(returnObj);
    }

    public org.openwork.portlet.skillmanagement.model.SkillCategory updateSkillCategory(
        org.openwork.portlet.skillmanagement.model.SkillCategory skillCategory,
        boolean merge)
        throws com.liferay.portal.kernel.exception.SystemException {
        Object paramObj0 = ClpSerializer.translateInput(skillCategory);

        if (skillCategory == null) {
            paramObj0 = new NullWrapper(
                    "org.openwork.portlet.skillmanagement.model.SkillCategory");
        }

        Object paramObj1 = new BooleanWrapper(merge);

        Object returnObj = null;

        try {
            returnObj = _classLoaderProxy.invoke("updateSkillCategory",
                    new Object[] { paramObj0, paramObj1 });
        } catch (Throwable t) {
            if (t instanceof com.liferay.portal.kernel.exception.SystemException) {
                throw (com.liferay.portal.kernel.exception.SystemException) t;
            }

            if (t instanceof RuntimeException) {
                throw (RuntimeException) t;
            } else {
                throw new RuntimeException(t.getClass().getName() +
                    " is not a valid exception");
            }
        }

        return (org.openwork.portlet.skillmanagement.model.SkillCategory) ClpSerializer.translateOutput(returnObj);
    }

    public org.openwork.portlet.skillmanagement.model.SkillCategory updateSkillCategory(
        long pk, java.lang.String name, long userId, long groupId)
        throws com.liferay.portal.kernel.exception.PortalException,
            com.liferay.portal.kernel.exception.SystemException {
        Object paramObj0 = new LongWrapper(pk);

        Object paramObj1 = ClpSerializer.translateInput(name);

        if (name == null) {
            paramObj1 = new NullWrapper("java.lang.String");
        }

        Object paramObj2 = new LongWrapper(userId);

        Object paramObj3 = new LongWrapper(groupId);

        Object returnObj = null;

        try {
            returnObj = _classLoaderProxy.invoke("updateSkillCategory",
                    new Object[] { paramObj0, paramObj1, paramObj2, paramObj3 });
        } catch (Throwable t) {
            if (t instanceof com.liferay.portal.kernel.exception.PortalException) {
                throw (com.liferay.portal.kernel.exception.PortalException) t;
            }

            if (t instanceof com.liferay.portal.kernel.exception.SystemException) {
                throw (com.liferay.portal.kernel.exception.SystemException) t;
            }

            if (t instanceof RuntimeException) {
                throw (RuntimeException) t;
            } else {
                throw new RuntimeException(t.getClass().getName() +
                    " is not a valid exception");
            }
        }

        return (org.openwork.portlet.skillmanagement.model.SkillCategory) ClpSerializer.translateOutput(returnObj);
    }

    public org.openwork.portlet.skillmanagement.model.SkillCategory addSkillCategory(
        java.lang.String name, long userId, long groupId)
        throws com.liferay.portal.kernel.exception.PortalException,
            com.liferay.portal.kernel.exception.SystemException {
        Object paramObj0 = ClpSerializer.translateInput(name);

        if (name == null) {
            paramObj0 = new NullWrapper("java.lang.String");
        }

        Object paramObj1 = new LongWrapper(userId);

        Object paramObj2 = new LongWrapper(groupId);

        Object returnObj = null;

        try {
            returnObj = _classLoaderProxy.invoke("addSkillCategory",
                    new Object[] { paramObj0, paramObj1, paramObj2 });
        } catch (Throwable t) {
            if (t instanceof com.liferay.portal.kernel.exception.PortalException) {
                throw (com.liferay.portal.kernel.exception.PortalException) t;
            }

            if (t instanceof com.liferay.portal.kernel.exception.SystemException) {
                throw (com.liferay.portal.kernel.exception.SystemException) t;
            }

            if (t instanceof RuntimeException) {
                throw (RuntimeException) t;
            } else {
                throw new RuntimeException(t.getClass().getName() +
                    " is not a valid exception");
            }
        }

        return (org.openwork.portlet.skillmanagement.model.SkillCategory) ClpSerializer.translateOutput(returnObj);
    }

    public java.util.List<org.openwork.portlet.skillmanagement.model.SkillCategory> search(
        long groupId)
        throws com.liferay.portal.kernel.exception.PortalException,
            com.liferay.portal.kernel.exception.SystemException {
        Object paramObj0 = new LongWrapper(groupId);

        Object returnObj = null;

        try {
            returnObj = _classLoaderProxy.invoke("search",
                    new Object[] { paramObj0 });
        } catch (Throwable t) {
            if (t instanceof com.liferay.portal.kernel.exception.PortalException) {
                throw (com.liferay.portal.kernel.exception.PortalException) t;
            }

            if (t instanceof com.liferay.portal.kernel.exception.SystemException) {
                throw (com.liferay.portal.kernel.exception.SystemException) t;
            }

            if (t instanceof RuntimeException) {
                throw (RuntimeException) t;
            } else {
                throw new RuntimeException(t.getClass().getName() +
                    " is not a valid exception");
            }
        }

        return (java.util.List<org.openwork.portlet.skillmanagement.model.SkillCategory>) ClpSerializer.translateOutput(returnObj);
    }

    public int searchCount(long groupId)
        throws com.liferay.portal.kernel.exception.PortalException,
            com.liferay.portal.kernel.exception.SystemException {
        Object paramObj0 = new LongWrapper(groupId);

        Object returnObj = null;

        try {
            returnObj = _classLoaderProxy.invoke("searchCount",
                    new Object[] { paramObj0 });
        } catch (Throwable t) {
            if (t instanceof com.liferay.portal.kernel.exception.PortalException) {
                throw (com.liferay.portal.kernel.exception.PortalException) t;
            }

            if (t instanceof com.liferay.portal.kernel.exception.SystemException) {
                throw (com.liferay.portal.kernel.exception.SystemException) t;
            }

            if (t instanceof RuntimeException) {
                throw (RuntimeException) t;
            } else {
                throw new RuntimeException(t.getClass().getName() +
                    " is not a valid exception");
            }
        }

        return ((Integer) returnObj).intValue();
    }

    public java.util.List<org.openwork.portlet.skillmanagement.model.SkillCategory> search(
        long[] groupId)
        throws com.liferay.portal.kernel.exception.PortalException,
            com.liferay.portal.kernel.exception.SystemException {
        Object paramObj0 = ClpSerializer.translateInput(groupId);

        if (groupId == null) {
            paramObj0 = new NullWrapper("[J");
        }

        Object returnObj = null;

        try {
            returnObj = _classLoaderProxy.invoke("search",
                    new Object[] { paramObj0 });
        } catch (Throwable t) {
            if (t instanceof com.liferay.portal.kernel.exception.PortalException) {
                throw (com.liferay.portal.kernel.exception.PortalException) t;
            }

            if (t instanceof com.liferay.portal.kernel.exception.SystemException) {
                throw (com.liferay.portal.kernel.exception.SystemException) t;
            }

            if (t instanceof RuntimeException) {
                throw (RuntimeException) t;
            } else {
                throw new RuntimeException(t.getClass().getName() +
                    " is not a valid exception");
            }
        }

        return (java.util.List<org.openwork.portlet.skillmanagement.model.SkillCategory>) ClpSerializer.translateOutput(returnObj);
    }

    public int searchCount(long[] groupId)
        throws com.liferay.portal.kernel.exception.PortalException,
            com.liferay.portal.kernel.exception.SystemException {
        Object paramObj0 = ClpSerializer.translateInput(groupId);

        if (groupId == null) {
            paramObj0 = new NullWrapper("[J");
        }

        Object returnObj = null;

        try {
            returnObj = _classLoaderProxy.invoke("searchCount",
                    new Object[] { paramObj0 });
        } catch (Throwable t) {
            if (t instanceof com.liferay.portal.kernel.exception.PortalException) {
                throw (com.liferay.portal.kernel.exception.PortalException) t;
            }

            if (t instanceof com.liferay.portal.kernel.exception.SystemException) {
                throw (com.liferay.portal.kernel.exception.SystemException) t;
            }

            if (t instanceof RuntimeException) {
                throw (RuntimeException) t;
            } else {
                throw new RuntimeException(t.getClass().getName() +
                    " is not a valid exception");
            }
        }

        return ((Integer) returnObj).intValue();
    }

    public ClassLoaderProxy getClassLoaderProxy() {
        return _classLoaderProxy;
    }
}
